import request from "@/utils/request";

// 获得门店商品分页
export function GetStoresGoodPage(query) {
    return request({
      url: "/store/product/page",
      method: "get",
      params: query,
    });
}

// 创建门店商品
export function CreateStoresGood(data) {
  return request({
    url: "/store/product/create",
    method: "post",
    data: data,
  });
}

// 更新门店商品
export function UpdateStoresGood(data) {
    return request({
      url: "/store/product/update",
      method: "put",
      data: data
    });
}

// 删除门店商品
export function delStoresGood(query) {
  return request({
    url: "/store/product/delete",
    method: "delete",
    params: query,
  });
}

// 获得产品类型分页
export function getGoodSort(query) {
    return request({
      url: "/store/product-type/page",
      method: "get",
      params: query,
    });
}

// 获得产品类型所有列表
export function getGoodAllSort(query) {
  return request({
    url: "/store/product-type/listAll",
    method: "get",
    params: query,
  });
}



// 创建产品类型
export function CreateGoodSort(data) {
    return request({
      url: "/store/product-type/create",
      method: "post",
      data: data,
    });
}

// 更新产品类型
export function UpdateGoodSort(data) {
    return request({
      url: "/store/product-type/update",
      method: "put",
      data: data
    });
}

// 删除产品类型
export function delGoodSort(query) {
    return request({
      url: "/store/product-type/delete",
      method: "delete",
      params: query,
    });
  }

// 更新门店商品上下架状态
export function updateUpDown(data) {
    return request({
      url: "/store/product/updateUpDown",
      method: "put",
      data: data
    });
}